﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using ZuesControls.Commons;
using ZuesControls.Controls;
using ZuesControls.Models;

namespace ZuesUI.Views
{
    /// <summary>
    /// GcodeWindow.xaml 的交互逻辑
    /// </summary>
    public partial class GcodeWindow : ZSWindow
    {
        public GcodeWindow(MainWindowViewModel viewModel)
        {
            InitializeComponent();
            this.DataContext = viewModel;
            // this.InfoBarModel = new InfoBarModel() { InfoType = ZuesControls.Enums.InfoType.Error, Message = "hello word" };
        }

        private async void Button_Click(object sender, RoutedEventArgs e)
        {
            var validLoginResult = await this.Loading.InvokeAsync(async (cancellationToken) =>
            {
              return await Method();
            });

        }

        private void Button_Click_1(object sender, RoutedEventArgs e)
        {

        }
        private async Task<OperateResult> Method()
        {
            await  Task.Delay(5000);
            return OperateResult.CreateSuccessResult();
        }
    }
}
